﻿using Application.AppService.EIAppService;
using Application.AppService.ERAppService;
using AutoMapper;
using Domain;
using Domain.Entity;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.RecruitmentManagement_招聘管理_.Employment_management_录用管理_
{
	public class ERApplicationController : Controller
	{
		private readonly IMapper mapper;
		private readonly IERAppService eRAppService;
		private readonly IEIAppService eIAppService;

		public ERApplicationController(IMapper mapper, IERAppService eRAppService, IEIAppService eIAppService)
		{
			this.mapper = mapper;
			this.eRAppService = eRAppService;
			this.eIAppService = eIAppService;
		}
		public IActionResult Index()
		{
			return View();
		}
		public IActionResult Index1()
		{
			return View();
		}
		[HttpPost("FYERApplication")]
		public IActionResult FYERApplication(int page, int pageSize)
		{

			ERFenYE erFenYE = eRAppService.DateERSAsync(page, pageSize, 3);
			return Json(erFenYE);
		}
		[HttpPost("UpdateERApplication")]
		public async Task<IActionResult> UpdateERApplication(ER er)
		{
			bool rs = await eRAppService.UpdateERApplicationAsync(er);
			return Json(rs);
		}
	}
}
